package com.sfx.exception;

import com.sfx.enums.AppHttpCodeEnum;

/**
 * Created with IntelliJ IDEA.
 * Description: 系统异常
 * User: sfx
 * Date: 2023-07-12
 * Time: 15:31
 */
public class SystemException extends RuntimeException{

    private int code;
    private String message;

    public SystemException(AppHttpCodeEnum appHttpCodeEnum) {
        super(appHttpCodeEnum.getMsg());
        this.code = appHttpCodeEnum.getCode();
        this.message = appHttpCodeEnum.getMsg();
    }

    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}